package com.atguigu.blog.mapper;

import com.atguigu.blog.pojos.Category;
import java.util.List;

/**
 * @author CF
 * @date 2023/8/18 20:56
 */
public interface CategoryMapper {
    /**
     * 查询所有分类
     * @return
     */
    List<Category> findAll();

    /**
     * 搜索cname查询分类
     * @param cname
     * @return
     */
    List<Category> searchCategoryByCname(String cname);

    /**
     * 修改分类
     * @param category
     * @return
     */
    boolean updateCategory(Category category);

    /**
     * 添加分类
     * @param category
     * @return
     */
    boolean addCategory(Category category);

    /**
     * 删除分类
     * @param id
     * @return
     */
    boolean deleteCategoryById(Integer id);
}
